package com.xbongbong.paas.connection.connector.service;

import com.xbongbong.sys.enums.DdModelEnum;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("standardConnectorFactory")
public class StandardConnectorFactory {
    @Resource
    private PaymentSheetStandardConnector paymentSheetStandardConnector;
    @Resource
    private CustomerStandardConnector customerStandardConnector;
    @Resource
    private ReimbursementStandardConnector reimbursementStandardConnector;

    public AbstractStandardConnector getStandardConnector(String modelId) {
        AbstractStandardConnector standardConnector = null;
        DdModelEnum ddModelEnum = DdModelEnum.getByModelId(modelId);
        switch (ddModelEnum) {
//            case STANDARD_CUSTOMER_MODEL:
//                standardConnector = customerStandardConnector;
//                break;
            case STANDARD_PAYMENT_SHEET_MODEL:
                standardConnector = paymentSheetStandardConnector;
                break;
            case STANDARD_REIMBURSEMENT_MODEL:
                standardConnector = reimbursementStandardConnector;
                break;
            default:
                break;
        }
        return standardConnector;
    }
}
